home *** CD-ROM | disk | FTP | other *** search
- /*
- File: SerialPortUtilities.h
-
- Contains: Useful utility functions for dealing with serial ports registered
- with the Communications Resource Manager (CRM).
-
- PC Card modems, PowerBook Internal modems, and NuBus Serial port
- are the most common types of these serial devices.
-
- A single function called:
-
- void ForEachSerialPort(SerialPortActionProcPtr actionProc,void * param);
-
- allows you to record information about available serial ports. Your
- “actionProc” is called once for every serial port in the system and
- is passed the CRMSerialPtr for the corresponding device.
-
- We use this function as a building block for:
-
- void AddSerialPortsToMenu(MenuRef serialPortMenu);
-
- which is very useful for building a popup or other menu from which
- the user can select an available serial port.
-
-
- Once you have a port name (either selected by the user or stored
- in a preferences file), you must get obtain the CRMSerialPtr in
- order to get the driver information and/or icon for a port. For
- this purpose, we include:
-
- CRMSerialPtr GetCRMSerialPtrForPort(StringPtr portName);
- */
-
- #ifndef _APPLE_SERIALPORTUTILITIES_
- #define _APPLE_SERIALPORTUTILITIES_
-
- #ifndef __CRMSERIALDEVICES__
- #include <CRMSerialDevices.h>
- #endif
-
- #ifndef __MENUS__
- #include <Menus.h>
- #endif
-
-
- typedef void (*SerialPortActionProcPtr)(CRMSerialPtr serialPortInfo,void * param);
- void ForEachSerialPort(SerialPortActionProcPtr actionProc,void * param);
- CRMSerialPtr GetCRMSerialPtrForPort(StringPtr portName);
-
- void AddSerialPortsToMenu(MenuRef serialPortMenu);
-
- #endif
-